home *** CD-ROM | disk | FTP | other *** search
/ CD/PC Actual 76 / DVD Actual 1 Marzo 2003.iso / Trial / TurboCAD 7.1 Pro / Data.Cab / F24952_MfcSplin.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-11-10  |  2.9 KB  |  92 lines

  1. /******************************************************************/
  2. /*                                                                */
  3. /*                      TurboCAD for Windows                      */
  4. /*                   Copyright (c) 1993 - 1999                    */
  5. /*             International Microcomputer Software, Inc.         */
  6. /*                            (IMSI)                              */
  7. /*                      All rights reserved.                      */
  8. /*                                                                */
  9. /******************************************************************/
  10. // MfcSplin.cpp : Defines the initialization routines for the DLL.
  11. //
  12.  
  13. #include "stdafx.h"
  14. #include "MfcSplin.h"
  15. #include "AutoSpl.h"
  16.  
  17. #ifdef _DEBUG
  18. #define new DEBUG_NEW
  19. #undef THIS_FILE
  20. static char THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23.  
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CMfcSplinApp
  26.  
  27. BEGIN_MESSAGE_MAP(CMfcSplinApp, CWinApp)
  28.     //{{AFX_MSG_MAP(CMfcSplinApp)
  29.         // NOTE - the ClassWizard will add and remove mapping macros here.
  30.         //    DO NOT EDIT what you see in these blocks of generated code!
  31.     //}}AFX_MSG_MAP
  32. END_MESSAGE_MAP()
  33.  
  34. /////////////////////////////////////////////////////////////////////////////
  35. // CMfcSplinApp construction
  36.  
  37. // DUAL_SUPPORT_START
  38. //    GUID for the type library (for registry functions)
  39. static const GUID LIBID_MfcSplin = 
  40.     { 0x7724BB42L,0xB671,0x11D0,0x9B,0x3B,0x44,0x45,0x53,0x54,0x00,0x00 };
  41. // DUAL_SUPPORT_END
  42.  
  43. CMfcSplinApp::CMfcSplinApp()
  44. {
  45. }
  46.  
  47. /////////////////////////////////////////////////////////////////////////////
  48. // The one and only CMfcSplinApp object
  49.  
  50. CMfcSplinApp theApp;
  51.  
  52. /////////////////////////////////////////////////////////////////////////////
  53. // CMfcSplinApp initialization
  54.  
  55. BOOL CMfcSplinApp::InitInstance()
  56. {
  57.       // Register all OLE server (factories) as running.  This enables the
  58.     //  OLE libraries to create objects from other applications.
  59.     COleObjectFactory::RegisterAll();
  60.  
  61.     // DUAL_SUPPORT_START
  62.     //    make sure the type library is registerd. Otherwise dual interface won't work!
  63.     //    note that we are embedding type library as a resource in this DLL.
  64.     AfxOleRegisterTypeLib(AfxGetInstanceHandle(), LIBID_MfcSplin);
  65.     // DUAL_SUPPORT_END
  66.  
  67.     return TRUE;
  68. }
  69.  
  70. /////////////////////////////////////////////////////////////////////////////
  71. // Special entry points required for inproc servers
  72.  
  73. STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
  74. {
  75.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  76.     return AfxDllGetClassObject(rclsid, riid, ppv);
  77. }
  78.  
  79. STDAPI DllCanUnloadNow(void)
  80. {
  81.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  82.     return AfxDllCanUnloadNow();
  83. }
  84.  
  85. // by exporting DllRegisterServer, you can use regsvr.exe
  86. STDAPI DllRegisterServer(void)
  87. {
  88.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  89.     COleObjectFactory::UpdateRegistryAll();
  90.     return S_OK;
  91. }
  92.